package day15;

/**
 * @author oldliu
 * @since 1.0
 */
public class Hotel {
    private String name,tele;
    Yingyezhizhao zhizhao=new Yingyezhizhao("包93993022","包河区工商局","2019-1","2024-12");
    public Hotel(String name, String tele) {
        this.name = name;
        this.tele = tele;
    }
    public void show(){
        System.out.println("这家宾馆叫"+name+",订房电话是"+tele);
        System.out.println("---------------------------------");
        //zhizhao.show();
    }
    public void dial(){
        System.out.println("正在拨打电话"+this.tele);
    }
    public class Yingyezhizhao{
        private String serialNo;
        private String banfa;
        private String from,to;

        public Yingyezhizhao(String serialNo, String banfa, String from, String to) {
            this.serialNo = serialNo;
            this.banfa = banfa;
            this.from = from;
            this.to = to;
        }
        public void show(){
            System.out.println("营业执照号码是"+serialNo);
            System.out.println("颁发机构"+banfa+",有效期从"+from+"到"+to);
            System.out.println("颁发给"+name);
            dial();
            Hotel.this.show();
        }
    }
}
